package com.weblog.search.client;

import com.weblog.search.client.factory.ArticleFallBackFactory;
import com.weblog.search.client.impl.ArticleClientImpl;
import com.weblog.search.interceptor.FeignInterceptor;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author MaoLin Wang
 * @date 2019/9/2215:37
 */
@FeignClient(value = "weblog-article",fallbackFactory = ArticleFallBackFactory.class,configuration = FeignInterceptor.class)
public interface ArticleClient {

    /**
     * 根据文章id封装搜索文章实体
     * @param aid
     * @return
     */
    @GetMapping("article/client/packageArticle/{aid}")
    Result packageArticle(@PathVariable("aid") String aid);


}
